<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="xbrlspec/stylesheet.xsl"?>
<spec 
xmlns="http://xbrl.org/specification/2007" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xsi:schemaLocation="http://xbrl.org/specification/2007 ../../specifications/xbrlspec/schema.xsd">

  <header>
    <wg>FWG</wg>
    <title>XBRL Registry Specification</title>
    <id>registry</id>
    <feedback>formula-feedback@xbrl.org</feedback>
    <namespaces>
      <namespace 
      id="ns-normative-schema" 
      value="http://xbrl.org/2008/registry" 
      prefix="reg"
      url="http://www.xbrl.org/2008/registry.xsd">
        The namespace of the normative schema.
      </namespace>
      <namespace 
      id="ns-errors" 
      value="http://xbrl.org/2008/registry/error" 
      prefix="rege">
        The namespace for errors defined in this specification.
      </namespace>
    </namespaces>
    <version>1.0</version>
    <date year="2009" month="06" day="22" />
    <status>REC</status>
    <authors xmlns="http://xbrl.org/specification/2007">
      <person id="person-geoff">
        <name >Geoff Shuetrim</name>
        <affiliation>Galexy</affiliation>
        <email>geoff@galexy.net</email>
      </person>
    </authors>
    <abstract>
      <p>
        This specification is defines a syntax for an XML document that
        contains location information about entries in a registry.
      </p>
    </abstract>
  </header>

  <body>

    <section id="sec-intro">
      <head>Introduction</head>
      <p>
        This specification is defines a syntax for an XML document that
        contains location information about entries in a registry.
      </p>

      <section id="sec-background">
        <head>Background</head>
        <p>
          This specification is intended to support the creation maintenance and publication
          of XBRL-related registries, including the XBRL function registry.
        </p>
      </section>

      <section id="sec-relationship-to-other-work">
        <head>Relationship to other work</head>
        <p>
          This specification does not depend on any other XBRL specification.
        </p>
      </section>
      
      <section id="sec-language">
        <head>Language independence</head>
        <p>
          The official language of XBRL International's own work
          products is English and the preferred spelling convention is
          UK English.
        </p>
      </section>
      <section id="sec-terminology">
        <head>Terminology</head>

        <p>
          This specification is consistent with the definitions of any of the
          terms defined in specifications that it depends on.
        </p>

      </section>

      <section id="sec-document-conventions">
        <head>Document conventions (non-normative)</head>
        
        <p>
          <xtermref bibref="VARIABLES" idref="sec-document-conventions">
          Documentation conventions</xtermref> follow those set out in
          the XBRL Variables Specification <bibref ref="VARIABLES"/>.
        </p>
      
      </section>
      
      <section id="sec-namespaces">
        <head>Namespaces and namespace prefixes</head>

        <p>
          Namespace prefixes <bibref ref="XMLNAMES"/> will be used 
          for elements and attributes in
          the form <code>ns:name</code> where <val>ns</val> is the 
          namespace prefix and <val>name</val> is the local name. 
          Throughout this specification, the mappings
          from namespace prefixes to actual namespaces is consistent
          with <tableref ref="table-namespaces"/>.
        </p>
        
        <p>
          The prefix column in <tableref ref="table-namespaces"/> is non normative. 
          The namespace URI column is normative.
        </p>        
        <table id="table-namespaces">
          <caption>Namespaces and namespace prefixes</caption>
          <thead>
            <tr>
              <th>Prefix</th>
              <th>Namespace URI</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td><val><namespaceref ref="ns-normative-schema" use="prefix"/></val></td>
              <td><val><namespaceref ref="ns-normative-schema" use="namespace"/></val></td>
            </tr>
            <tr>
              <td><val><namespaceref ref="ns-errors" use="prefix"/></val></td>
              <td><val><namespaceref ref="ns-errors" use="namespace"/></val></td>
            </tr>
            <tr>
              <td><val>xml</val></td>
              <td><val>http://www.w3.org/XML/1998/namespace</val></td>
            </tr>
            <tr>
              <td><val>xlink</val></td>
              <td><val>http://www.w3.org/1999/xlink</val></td>
            </tr>
          </tbody>
        </table>
        
      </section>
      
    </section>
    
    <section id="sec-syntax">
      <head>Syntax</head>

      <p>
        This specification only provides a textual declaration of syntax
        constraints when those constraints are not expressed by the
        normative schema supplied with this specification.
      </p>
      <p>
        Explanations of elements and attributes are only supplied when
        explanations are not already provided in other
        specifications.
      </p>
      <p>
        Unless explicitly stated otherwise, a reference to a specific
        element <rfc2119>MUST</rfc2119> be read as a reference to that 
        element or to any element in its 
        <xtermref bibref="XMLSCHEMA-STRUCTURES" idref="key-equivalenceClass">
        substitution group
        </xtermref>.
      </p>

      <section id="sec-xml-attributes">
        <head>Attributes in the XML namespace</head>

        <p>
          Any attribute in the XML namespace (<val>http://www.w3.org/XML/1998/namespace</val>) <rfc2119>MAY</rfc2119> be
          used on any element within a <termref ref="term-registry">registry</termref> or within an XML
          resource that is referenced by a <termref ref="term-registry-entry">registry entry</termref>.
        </p>

        <p>
          The <att>xml:lang</att> attribute <rfc2119>MAY</rfc2119> be used to indicate the language used to express
          information in the registry, as per the XML Specification <bibref ref="XML"/>.
        </p>

        <p>
          The <att>xml:base</att> attribute <rfc2119>MAY</rfc2119> be used when resolving URIs 
          as per the XML Base Specification <bibref ref="XMLBASE"/>.
        </p>

      </section>

      <section id="sec-registry">
        <head>Element: registry</head>

        <p>
          The <xmlref ref="xml-registry"><elt>reg:registry</elt></xmlref> element 
          is the root element of a registry.
        </p>

        <p>
          <definition id="term-registry" term="registry">
            A <term>registry</term> is a <elt>reg:registry</elt> element
            containing a list of zero or more <termref ref="term-registry-entry">registry entries</termref>
          </definition>
        </p>

        <section id="sec-last-updated">
          <head>Element: lastUpdated</head>

          <p>
            The <xmlref ref="xml-last-updated"><elt>reg:lastUpdated</elt></xmlref> element 
            contains a <att>moment</att> attribute whose value is the 
            instant on which an entry in the registry was last updated.
          </p>

        </section>

        <section id="sec-name">
          <head>Element: name</head>

          <p>
            The <xmlref ref="xml-name"><elt>reg:name</elt></xmlref> element 
            contains the name of the registry.
          </p>

        </section>


        <section id="sec-documentation">
          <head>Element: documentation</head>

          <p>
            The <xmlref ref="xml-documentation"><elt>reg:documentation</elt></xmlref> element 
            contains either a URL that resolves to documentation of the registry or it contains
            XHTML <bibref ref="XHTML"/> markup documenting the registry.
          </p>

          <p>
            If the documentation is provided as a URL, then the URL is specified using a 
            <elt>reg:url</elt> element that follows the syntax rules specified in 
            <sectionref ref="sec-url"/>.
          </p>

        </section>

        <section id="sec-registry-entry">
          <head>Element: entry</head>

          <p>
            The <xmlref ref="xml-entry"><elt>reg:entry</elt></xmlref> element 
            is an abstract element that serves as a placeholder for concrete
            registry entries.
          </p>

          <p>
            <definition id="term-registry-entry" term="registry entry">
              A <term>registry entry</term> is an element in the substitution group
              for the <elt>reg:entry</elt> element that is a child of a
              a <termref ref="term-registry">registry</termref>.
            </definition>
          </p>

          <section id="sec-added">
            <head>Element: added</head>

            <p>
              The <xmlref ref="xml-entry-added"><elt>reg:added</elt></xmlref> element 
              contains a <att>moment</att> attribute whose value is the 
              instant on which an entry in the registry was last updated.
            </p>

          </section>

          <section id="sec-status">
            <head>Element: status</head>

            <p>
              The <xmlref ref="xml-entry-status"><elt>reg:status</elt></xmlref> element 
              contains one of the following values to indicate a particular status
              of the entry in the registry:
            </p>

            <ulist>
              <item><val>IWD</val> - Internal working draft</item>
              <item><val>DPWD</val> - Draft public working draft</item>
              <item><val>PWD</val> - Public working draft</item>
              <item><val>CR</val> - Candidate recommendation</item>
              <item><val>REC</val> - Recommendation</item>
            </ulist>
            
            <p>
              When published in the public domain, a registry <rfc2119>MUST</rfc2119> only contain 
              entries that have a status of <val>PWD</val>, <val>CR</val> 
              or <val>REC</val>.  All other entries will be removed from the registry
              prior to publication.
            </p>

          </section>

          <section id="sec-url">
            <head>Element: url</head>

            <p>
              The <xmlref ref="xml-entry-url"><elt>reg:url</elt></xmlref> element 
              contains an <att>xlink:type</att> attribute that equals <val>simple</val> and
              an <att>xlink:href</att> attribute that contains a URI that <rfc2119>MUST</rfc2119> 
              resolve to the resource that identified by the registry entry.
            </p>
            
            <p>
              The <elt>reg:url</elt> element <rfc2119>MAY</rfc2119> contain string content documenting
              the nature of the resource that the URL is linking to.
            </p>

          </section>

        </section>

      </section>

      <section id="sec-owner">
        <head>Element: owner</head>
        
        <p>
          Registry entries can include a list of one or more owners.
        </p>
        
        <p>
          The <xmlref ref="xml-owner"><elt>reg:owner</elt></xmlref> element 
          contains information about an owner of a resource that can have 
          <termref ref="term-registry-entry">registry entry</termref>.
        </p>
          
        <p>
          The mandatory <att>id</att> attribute on a <elt>reg:owner</elt> element
          is used to reference the owner from the revision history for a resource that 
          is referenced by a registry entry.
        </p>

        <section id="sec-owner-name">
          <head>Element: name</head>

          <p>
            The <xmlref ref="xml-owner-name"><elt>reg:name</elt></xmlref> element 
            contains the name of the owner.
          </p>

        </section>

        <section id="sec-affiliation">
          <head>Element: affiliation</head>

          <p>
            The <xmlref ref="xml-owner-affiliation"><elt>reg:affiliation</elt></xmlref> element 
            contains the affiliation of the owner.
          </p>

        </section>

        <section id="sec-email">
          <head>Element: email</head>

          <p>
            The <xmlref ref="xml-owner-email"><elt>reg:email</elt></xmlref> element 
            contains the email address of the owner.
          </p>

        </section>

        <section id="sec-assumed-ownership">
          <head>Element: assumedOwnership</head>

          <p>
            The <xmlref ref="xml-owner-assumed-ownership"><elt>reg:assumedOwnership</elt></xmlref> element 
            contains a <att>moment</att> attribute that is the instant that the owner
            assumed ownership of the resource.
          </p>

        </section>

        <section id="sec-relinquished-ownership">
          <head>Element: relinquishedOwnership</head>

          <p>
            The <xmlref ref="xml-owner-relinquished-ownership"><elt>reg:relinquishedOwnership</elt></xmlref> element 
            contains a <att>moment</att> attribute that is the instant that the owner
            relinquished ownership of the resource.
          </p>

        </section>
  
      </section>

      <section id="sec-revision">
        <head>Element: revision</head>

        <p>
          The <xmlref ref="xml-revision"><elt>reg:revision</elt></xmlref> element 
          contains information about a revision to a resource that can have 
          <termref ref="term-registry-entry">registry entry</termref>.
        </p>

        <p>
          A <elt>reg:revision</elt> element 
          contains either a URL that resolves to documentation of the registry or it contains
          XHTML <bibref ref="XHTML"/> markup documenting the nature of the revision.
        </p>

        <p>
          All <elt>reg:revision</elt> elements have an <att>on</att> attribute that records
          the moment at which the revision was finalised.
        </p>

        <p>
          All <elt>reg:revision</elt> elements have a <att>by</att> attribute
          that contains an IDREF to the ID of the owner responsible for making the revision.
        </p>

      </section>

      <section id="sec-test">
        <head>Element: test</head>

        <p>
          The <xmlref ref="xml-test"><elt>reg:test</elt></xmlref> element 
          is abstract.
        </p>

        <p>
          All conformance suite test resources that are referenced
          from within the XML resources that have entries in an XBRL registry
          <rfc2119>MUST</rfc2119> be in the substitution group for the 
          <elt>reg:test</elt> element.
        </p>

      </section>

    </section><!-- Syntax -->

  </body>
  
  <back>

    <section id="sec-schema">

      <head>Normative schema</head>
      
      <p>
        The following is the XML schema provided as part of this
        specification. This is normative. Non-normative versions (which
        should be identical to these except for appropriate comments
        indicating their non-normative status) are also provided as
        separate files for convenience of users of the specification.
      </p>
      
      <p>
        NOTE: (non-normative) Following the schema maintenance policy of
        XBRL International, it is the intent (but is not guaranteed)
        that the location of non-normative versions of these schemas on
        the web will be as follows:
      </p>
      
      <olist>
        <item>
          While any schema is the most current RECOMMENDED version and
          until it is superseded by any additional errata corrections a
          non-normative version will reside on the web in the directory
          <code>http://www.xbrl.org/2008/</code> - during the drafting process for
          this specification this directory should contain a copy of the
          most recent published version of the schema at
          <namespaceref ref="ns-normative-schema" use="url"/>.
        </item>
        <item>
          A non-normative version of each schema as corrected by any
          update to the RECOMMENDATION will be archived in perpetuity on
          the web in a directory that will contain a unique
          identification indicating the date of the update.
        </item>
      </olist>
      <p role="xml-normative">
        <verbatim>
          <includeChunk ref="../schemas/registry.xsd"/>
        </verbatim>
      </p>
    </section>

    <section id="sec-references">

      <head>References</head>

    	<bibliography>
          <includeChunk ref="../../specifications/boilerplate/references/VARIABLES.xml"/>
          <includeChunk ref="../../specifications/boilerplate/references/XML.xml"/>
          <includeChunk ref="../../specifications/boilerplate/references/XMLBASE.xml"/>
          <includeChunk ref="../../specifications/boilerplate/references/XMLNAMES.xml"/>
          <includeChunk ref="../../specifications/boilerplate/references/XHTML.xml"/>
          <includeChunk ref="../../specifications/boilerplate/references/XMLSCHEMA-STRUCTURES.xml"/>
    	</bibliography>

      </section>

      <section id="sec-ip-status" xmlns="http://xbrl.org/specification/2007">
        <head>Intellectual property status (non-normative)</head>
        
        <p>
          This document and translations of it may be copied and
          furnished to others, and derivative works that comment on or
          otherwise explain it or assist in its implementation may be
          prepared, copied, published and distributed, in whole or in
          part, without restriction of any kind, provided that the above
          copyright notice and this paragraph are included on all such
          copies and derivative works. However, this document itself may
          not be modified in any way, such as by removing the copyright
          notice or references to XBRL International or XBRL
          organizations, except as required to translate it into
          languages other than English. Members of XBRL International
          agree to grant certain licenses under the XBRL International
          Intellectual Property Policy 
          (<xref ref="http://www.xbrl.org/legal">www.xbrl.org/legal</xref>).
        </p>

        <p>
          This document and the information contained herein is provided
          on an "AS IS" basis and XBRL INTERNATIONAL DISCLAIMS ALL
          WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
          ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT
          INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
          MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
        </p>
      
        <p>
          The attention of users of this document is directed to the
          possibility that compliance with or adoption of XBRL
          International specifications may require use of an invention
          covered by patent rights. XBRL International shall not be
          responsible for identifying patents for which a license may be
          required by any XBRL International specification, or for
          conducting legal inquiries into the legal validity or scope of
          those patents that are brought to its attention. XBRL
          International specifications are prospective and advisory
          only. Prospective users are responsible for protecting
          themselves against liability for infringement of patents. XBRL
          International takes no position regarding the validity or
          scope of any intellectual property or other rights that might
          be claimed to pertain to the implementation or use of the
          technology described in this document or the extent to which
          any license under such rights might or might not be available;
          neither does it represent that it has made any effort to
          identify any such rights. Members of XBRL International agree
          to grant certain licenses under the XBRL International
          Intellectual Property Policy 
          (<xref ref="http://www.xbrl.org/legal">www.xbrl.org/legal</xref>).
        </p>
      </section>

      <section id="sec-acknowledgements" xmlns="http://xbrl.org/specification/2007">
        <head>Acknowledgements (non-normative)</head>
        <p>
          This document could not have been written without the
          contributions of many people including the participants in the
          <wgref/>.
        </p>
      
      </section>

    <section id="sec-history">
      <head>Document history (non-normative)</head>
      
      <revisions>

        <revision ref="person-geoff"
        day="17" month="01" year="2008">
          <p>
            First internal working draft created.
          </p>
        </revision>

        <revision ref="person-geoff"
        day="29" month="01" year="2008">
          <p>
            Incorporated element definitions and explanations based
            on the normative schema.
          </p>
        </revision>

        <revision ref="person-geoff"
        day="30" month="01" year="2008">
          <p>
            Fixed XML Schema errors for simple content model type definitions.
          </p>
          <p>
            Fixed the incorrect element name for the child elements in the owners
            content model.
          </p>
        </revision>

        <revision ref="person-geoff"
        day="31" month="01" year="2008">
          <p>
            Adapted hyperlinks to use XLink simple link syntax.
          </p>
        </revision>

      </revisions>

    </section>

    <section id="sec-corrections" xmlns="http://xbrl.org/specification/2007">
      <head>Errata corrections in this document</head>
      
      <p>
        This appendix contains a list of the errata that have been
        incorporated into this document. This represents all those
        errata corrections that have been approved by the XBRL
        International <wgref/> up to and
        including <dateref style="DD Month YYYY"/>. 
        Hyperlinks to relevant e-mail threads may
        only be followed by those who have access to the relevant
        mailing lists. Access to internal XBRL mailing lists is
        restricted to members of XBRL International Inc.
      </p>

      <errata/>

    </section>

  </back>
</spec>
